﻿using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace DomainExample.Repository.Tests
{
    [TestClass]
    public sealed class RepositoryFactoryTests
    {
        private IRepositoryFactory _target;

        [TestInitialize]
        public void SetUp()
        {
            _target = RepositoryFactory.NewRepositoryFactory();
        }

        [TestMethod]
        public void GetPersonRepositoryExpectCorrectInstance()
        {
            var result = _target.GetPersonRepository();

            Assert.IsNotNull(result);
            Assert.AreEqual(typeof(PersonRepository), result.GetType());
        }
    }
}
